Conversation
…-62) SessionStop is not a valid Claude Code hook event name. The correct name is Stop. This fix ensures the stop hook actually fires. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
📝 WalkthroughWalkthroughThe PR renames the session-stop event key from "SessionStop" to "Stop" in the hooks configuration, updating the internal event type constant, hooks config mapping, and corresponding test assertions. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes an incorrect Claude Code hook event name by renaming SessionStop to Stop in the Claude Code settings.json hook configuration. According to the PR description, SessionStop is not a valid Claude Code hook event name—the correct name is Stop. This change ensures that the git-mem hooks will be properly recognized by Claude Code.
Changes:
- Updated
GIT_MEM_EVENT_TYPESconstant from'SessionStop'to'Stop' - Updated
buildHooksConfig()to useStopkey instead ofSessionStop - Updated console output to display
Stopinstead ofSessionStop - Updated corresponding unit tests to reflect the corrected event name
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/commands/init-hooks.ts |
Updated constant, buildHooksConfig function, and console output to use correct Claude Code hook event name Stop |
tests/unit/commands/init-hooks.test.ts |
Updated tests to verify correct handling of Stop event instead of SessionStop |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
SessionStoptoStopinGIT_MEM_EVENT_TYPES,buildHooksConfig(), and console outputSessionStopis not a valid Claude Code hook event name — the correct name isStopCloses GIT-62
Test plan
npm test)npm run pre-commit).claude/settings.jsonusesStopafter runninggit-mem init🤖 Generated with Claude Code
Summary by CodeRabbit